package main
import (
	"fmt"
	"net/http"
)

func main(){
	url := "http://www.baidu.com/"
	resp, err := http.Get(url)
	if err != nil{
		fmt.Println("Get Err : ", err)
		return
	}
	defer resp.Body.Close()
	buf := make([]byte, 1024)
	for{
		sum, _ := resp.Body.Read(buf)
		if sum == 0{
			break
		}
		fmt.Println(string(buf[:sum]))
	}
}